<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:xhtml />
<script type="text/javascript">
    function toggleGenes()
    {
        if ($("select[name=unPhasedFormat]").val() == "true")
        {
            $("select[name=selectedGenes]").removeAttr("disabled");
        }
        else
        {
            $("select[name=selectedGenes]").attr("disabled", "disabled");
        }
    }

    $(document).ready(function() {
        $("select[name=unPhasedFormat]").change(function() {
            toggleGenes();
        });
        toggleGenes();
    });
</script>
<div id="continuous" class="content input">
    <h2>Continous Varible Phenotype Files</h2>
    <html:form action="continuousSubmit" >
        <dl>
            <dt>Cohorts:</dt>
            <dd>
                <html:select property="selectedCohort" size="6" multiple="multiple">
                    <html:optionsCollection property="cohorts" value="cohortID" label="name" />
                </html:select>
            </dd>
            <dt>Subject Filter:</dt>
            <dd>
                <html:checkbox styleId="removeDuplicateSubjects" property="removeDuplicateSubjects" />
                <label for="removeDuplicateSubjects">Remove Duplicate Subjects</label><br />
                <html:checkbox styleId="removeMzTwins" property="removeMzTwins" />
                <label for="removeMzTwins">Remove MZ Twins</label>
            </dd>
            <dt>Phenotypes:</dt>
            <dd>
                <html:select property="selectedPhenotype">
                    <html:optionsCollection property="phenotypes" value="phenotypeID" label="name" />
                </html:select>
            </dd>
            <dt>Genes to include:</dt>
            <dd>
                <html:select property="selectedGenes" multiple="multiple">
                    <html:optionsCollection property="availableGenes" value="geneID" label="name"/>
                </html:select>
            </dd>
            <dt>Output Format:</dt>
            <dd>
                <html:select property="unPhasedFormat">
                    <html:option value="true">UNPHASED</html:option>
                    <html:option value="false">Plink</html:option>
                </html:select>
            </dd>
            <dt>Email:</dt>
            <dd><html:text property="email"/></dd>
        </dl>
        <p><html:submit property="submitType" value="Submit" /></p>
    </html:form>
</div>